flag_no_run: bool,
flag_package: Option<String>,
flag_target: Option<String>,
+ flag_lib: bool,
+ flag_bin: Vec<String>,
+ flag_example: Vec<String>,
+ flag_test: Vec<String>,
+ flag_bench: Vec<String>,
flag_verbose: bool,
+ flag_release: bool,
}
pub const USAGE: &'static str = "
no_default_features: options.flag_no_default_features,
spec: options.flag_package.as_ref().map(|s| &s[..]),
exec_engine: None,
- release: false,
+ release: options.flag_release,
mode: ops::CompileMode::Test,
- filter: if tests.is_empty() && bins.is_empty() {
- ops::CompileFilter::Everything
- } else {
- ops::CompileFilter::Only {
- lib: false, examples: &[], benches: &[],
- tests: &tests, bins: &bins,
- }
- }
+ filter: ops::CompileFilter::new(options.flag_lib,
+ &options.flag_bin,
+ &options.flag_test,
+ &options.flag_example,
+ &options.flag_bench),
},
};